home *** CD-ROM | disk | FTP | other *** search
- // rb_plugin.h
- //
- // This file is part of the REALbasic plugin API. Include this file
- // at the top of your plugin source files.
- //
- // © 1997-2000 REAL Software Inc. -- All Rights Reserved
- //
- // Document Scope: Win32 Plugins
- // Document Author: ?
- // Document Contributor(s): G. Cortis Clark (GCC)
- //
- // Revision History:
- // Oct 20 2000 -- GCC (1) Prefix all calls to QuickTime code with QT. The namespace was
- // introduced in WinHeader.h to prevent problems with conflicts in RB
- // code. The QT namespace on Mac Targets is ignored.
-
- #ifndef RB_PLUGIN_H
- #define RB_PLUGIN_H
-
- #if !WIN32 // Oct 20 2000 -- GCC (1) -- Start
- #define QT
- #endif // Oct 20 2000 -- GCC (1) -- End
-
- #include "REALplugin.h"
-
- // picture types and description
- enum {
- pictureUnknown,
- pictureMacintoshPICT,
- pictureMacintoshCICN,
- pictureMacintoshIconSuite,
- pictureMacintoshGWorld
- };
-
- struct REALpictureDescription
- {
- long pictureType;
- void *pictureData;
- long width, height;
- };
-
- // Sound types and description
- enum {
- soundUnknown,
- soundMacintoshSnd
- };
-
- struct REALsoundDescription
- {
- long soundType;
- void *soundData;
- };
-
- // handy macros
- #define ControlData(defn, instance, typeName, data) typeName *data = (typeName *) REALGetControlData(instance, &defn)
- #define ClassData(defn, instance, typeName, data) typeName *data = (typeName *) REALGetClassData(instance, &defn)
-
- // socket constants
- #define socketEventConnect 1
- #define socketEventError 2
- #define socketEventDataReceived 4
- #define socketEventSendComplete 8
-
- // **** Autogenerated code from Plugin API Manager follows ****
- // *************** Do not edit below this line ****************
-
- #if TARGET_68K || TARGET_PPC
- QDGlobals *REALQDGlobals(void);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- int REALallocateMenuID(void);
- #endif
-
- Boolean REALinRuntime(void);
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- void REALreleaseMenuID(int id);
- #endif
-
- void GraphicsDrawLine(REALgraphics graphicsObject, int x1, int y1, int x2, int y2);
-
- void REALRegisterMethod(REALmethodDefinition *defn);
-
- void REALRegisterControl(REALcontrol *defn);
-
- void REALRegisterClassExtension(REALclassDefinition *defn);
-
- void REALRegisterDBEngine(REALdbEngineDefinition *defn);
-
- void REALRegisterDBTable(REALdbTableDefinition *defn);
-
- void REALRegisterDBCursor(REALdbCursorDefinition *defn);
-
- void REALRegisterClass(REALclassDefinition *defn);
-
- const char *REALCString(REALstring str);
-
- const unsigned char *REALPString(REALstring str);
-
- REALstring REALInterpretConstantValue(REALstring value);
-
- REALstring REALDefaultControlFont(void);
-
- REALstring REALDefaultControlCaption(void);
-
- unsigned long REALDefaultControlFontSize(void);
-
- REALstring REALBuildString(const char *contents, int length);
-
- void REALLockObject(REALobject obj);
-
- void REALUnlockObject(REALobject obj);
-
- void REALLockString(REALstring str);
-
- void REALUnlockString(REALstring str);
-
- REALproc REALInterfaceRoutine(REALobject obj, const char *interfaceName, const char *methodName);
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- REALpicture REALBuildPictureFromPicHandle(PicHandle pic, Boolean bPassOwnership);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- REALpicture REALBuildPictureFromGWorld(GWorldPtr world, Boolean bPassOwnership);
- #endif
-
- REALpicture REALBuildPictureFromPictureDescription(REALpictureDescription *description, Boolean bPassOwnership);
-
- void REALLockPictureDescription(REALpicture pic, REALpictureDescription *description);
-
- void REALUnlockPictureDescription(REALpicture pic);
-
- void REALLockSoundDescription(REALsound sound, REALsoundDescription *description);
-
- void REALUnlockSoundDescription(REALsound sound);
-
- void REALPictureClearCache(REALpicture pic);
-
- #if TARGET_WIN32
- void REALDrawPicturePrimitive(HDC hDC, REALpicture pic, const Rect *rBounds, int bTransparent);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- void REALDrawPicturePrimitive(REALpicture pic, const Rect *rBounds, int bTransparent);
- #endif
-
- REALdbCursor REALdbCursorFromDBCursor(dbCursor *cursor, REALdbCursorDefinition *defn);
-
- REALdbDatabase REALdbDatabaseFromDBDatabase(dbDatabase *database, REALdbEngineDefinition *defn);
-
- void *REALGetEventInstance(REALcontrolInstance instance, REALevent *event);
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- void REALRegisterEventFilter(REALEventCallback callback, long param);
- #endif
-
- void *REALGetControlData(REALcontrolInstance instance, REALcontrol *defn);
-
- void *REALGetClassData(REALobject instance, REALclassDefinition *defn);
-
- void REALGetControlBounds(REALcontrolInstance instance, Rect *rBounds);
-
- long REALGetControlVisible(REALcontrolInstance instance);
-
- Boolean REALGetControlEnabled(REALcontrolInstance instance);
-
- void REALSetControlVisible(REALcontrolInstance instance, unsigned long visible);
-
- REALgraphics REALGetControlGraphics(REALcontrolInstance instance);
-
- #if TARGET_WIN32
- int REALGetWin32Charset(void);
- #endif
-
- #if TARGET_WIN32
- REALfolderItem REALFolderItemFromPath(const char *path);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- REALfolderItem REALFolderItemFromFSSpec(const FSSpec *spec);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- Boolean REALFSSpecFromFolderItem(FSSpec *spec, REALfolderItem item);
- #endif
-
- REALstring REALpathFromFolderItem(REALfolderItem item);
-
- #if TARGET_WIN32
- HDC REALGraphicsDC(REALgraphics context);
- #endif
-
- #if TARGET_WIN32
- HWND REALGetControlHWND(REALcontrolInstance control);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- void REALSelectGraphics(REALgraphics context);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- void REALGraphicsDrawOffscreenMacControl(REALgraphics context, ControlHandle mh);
- #endif
-
- void REALInvalidateControl(REALcontrolInstance instance);
-
- void REALInvalidateControlRect(REALcontrolInstance instance, int left, int top, int right, int bottom);
-
- #if TARGET_WIN32
- void REALSetSpecialBackground(REALcontrolInstance instance, COLORREF *pcolor);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- void REALSetSpecialBackground(REALcontrolInstance instance);
- #endif
-
- REALwindow REALGetControlWindow(REALcontrolInstance instance);
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- REALsound REALBuildSoundFromHandle(Handle sound, Boolean bPassOwnership);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- REALappleEvent REALBuildAppleEvent(const AppleEvent *event, Boolean bPassOwnership);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- REALappleEvent REALBuildAEDescList(const AppleEvent *event, Boolean bPassOwnership);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- REALappleEvent REALBuildAEObjSpecifier(const AppleEvent *event, Boolean bPassOwnership);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- AppleEvent *REALAccessAppleEvent(REALappleEvent event);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- AppleEvent *REALAccessAppleEventReply(REALappleEvent event);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- WindowPtr REALGetWindowHandle(REALwindow window);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- ControlHandle REALGetControlHandle(REALcontrolInstance control);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- MenuHandle REALGetPopupMenuHandle(REALpopupMenu popup);
- #endif
-
- QT::MovieController REALgetMoviePlayerController(REALmoviePlayer instance);
-
- QT::Movie REALgetMovieMovie(REALmovie instance);
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- REALmovie REALbuildMovie(QT::Movie movie, int resRefNum, int bNew);
- #endif
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- void REALmarkMovieDirty(REALmovie movie);
- #endif
-
- int REALenterMovies(void);
-
- REALobject REALnewInstance(const char *className);
-
- void REALMarkSocketUsage(void);
-
- void REALSocketConnect(REALsocket socket, REALstring address, int port);
-
- void REALSocketClose(REALsocket socket);
-
- REALstring REALSocketReadAll(REALsocket socket);
-
- REALstring REALSocketRead(REALsocket socket, int count);
-
- void REALSocketWrite(REALsocket socket, REALstring data);
-
- int REALSocketLastErrorCode(REALsocket socket, int unused);
-
- REALstring REALSocketLookahead(REALsocket socket, int unused);
-
- REALstring REALSocketLocalAddressGetter(REALsocket socket, int unused);
-
- void REALSocketPoll(REALsocket socket);
-
- int REALSocketGetEvents(REALsocket socket, int unused);
-
- void REALRegisterDataSourceInterface(const char *szMenuName, REALDataSourceInterfaceProc proc);
-
- void REALRegisterDataSource(const char *szDatasourceName, REALDataSourceProc proc);
-
- void REALDesignAddDataSource(const char *baseName, const char *szDataSourceName, Ptr data, int dataLen);
-
- void REALMessageBox(REALstring text);
-
- #if TARGET_WIN32
- REALpicture REALBuildPictureFromDIB(HANDLE hDIB, Boolean bPassOwnership);
- #endif
-
- void REALSetControlEnabled(REALcontrolInstance instance, long unused, Boolean enable);
-
- long REALGetControlPosition(REALcontrolInstance instance, long which);
-
- void REALSetControlPosition(REALcontrolInstance instance, long which, long value);
-
- #if TARGET_68K || TARGET_PPC || TARGET_CARBON
- void REALRefreshWindow(unsigned long macWindowPtr);
- #endif
-
- REALgraphics REALGetPictureGraphics(REALpicture picture);
-
- REALpicture REALNewPicture(long width, long height, long depth);
-
- REALmemoryBlock REALNewMemoryBlock(int bytes);
-
- void*REALMemoryBlockGetPtr(REALmemoryBlock memBlock);
-
- int REALMemoryBlockGetSize(REALmemoryBlock memBlock);
-
- REALmemoryBlock REALPtrToMemoryBlock(void*data);
-
- #if TARGET_WIN32
- void REALSetAccelerator(REALcontrolInstance instance, REALstring key);
- #endif
-
- // **** Autogenerated code from Plugin API Manager ends here ****
- // **************** Do not edit above this line *****************
-
- long REALstringToOSType(REALstring id);
-
- #endif
-